[release/11.0] Harden race condition when submitting 2FA during password reset - #69062
Open
github-actions[bot] wants to merge 4 commits into
Open
[release/11.0] Harden race condition when submitting 2FA during password reset#69062github-actions[bot] wants to merge 4 commits into
github-actions[bot] wants to merge 4 commits into
Conversation
Co-authored-by: Korolev Dmitry <dmkorolev@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
|
Hi @github-actions[bot]. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge. To learn more about how to prepare a servicing PR click here. |
halter73
approved these changes
Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #68350 to release/11.0
/cc @Youssef1313
Harden race condition when submitting 2FA during password reset
Hardens a race condition when password is reset in the time window between requesting 2FA and submitting it.
Description
There is a niche race condition when a password is reset after 2FA is requested and before 2FA is submitted. The 2FA submit is currently accepted even if the password was reset in between.
This PR hardens the implementation so that we validate the security stamp and reject the 2FA submission in this case.
Fixes #66824
Customer Impact
Hardening race condition. Not much impact is noticeable in all common cases. Only fixes a race in a niche scenario.
Regression?
Risk
This adds additional validation for the 2FA security stamp. The code change is minimal and tested.
Verification
Automated.
Packaging changes reviewed?
N/A